package net.dfrz.oa.dao.repository;

import net.dfrz.oa.dao.repository.support.BaseRepository;
import net.dfrz.oa.pojo.OneCategory;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * 一级菜单dao类
 * @author vovh
 *
 */
public interface OneCategoryRepository extends BaseRepository<OneCategory>{
	
	/**
	 * 根据权限查询出一级菜单
	 */
	@Query("SELECT o FROM OneCategory o WHERE o.autority.id = :id")
	OneCategory findByAid(@Param("id") Integer id);
	
}
